package com.guoj.webmagic.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;

/**
 * elasticsearch存放的对象
 * -- indexName是索引名，type是索引类型，createIndex=false表示不再创建索引，
 * 	  因为我们是通过restful手动创建的，代码中改为false避免启动后又创建。
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "haoke", type = "house", createIndex = false)
//@Document(indexName = "haoke", type = "house")
public class HouseData {
	@Id
	private String id;
	@Field(index = true, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
	private String title;
	private String rent;
	private String floor;
	private String image;
	private String orientation;
	private String houseType;
	private String rentMethod;
	private String time;
}